/* 自定义样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 电影卡片样式 */
.movie-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.movie-card .card-header {
    border-bottom: none;
    font-weight: 600;
    font-size: 0.85em;
}

.movie-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info {
    font-size: 0.85em;
}

.genres .badge {
    font-size: 0.7em;
    border: 1px solid #dee2e6;
}

.quality-indicator .progress {
    background-color: #e9ecef;
}

.quality-indicator .progress-bar {
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
}

/* 池子统计样式 */
.pool-stat {
    padding: 0.5rem;
}

.pool-name {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 500;
}

.pool-count {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
}

/* 评分星星样式 */
.rating-stars {
    font-size: 2rem;
}

.rating-star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0 0.1rem;
}

.rating-star:hover,
.rating-star.active {
    color: #ffc107;
}

/* 用户画像样式 */
.user-profile-card {
    border-left: 4px solid var(--primary-color);
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.preference-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* 管理员仪表板样式 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
}

/* 系统健康状态指示器 */
.health-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.health-online {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.health-error {
    background-color: #dc3545;
}

.health-initializing {
    background-color: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .movie-card .card-title {
        font-size: 0.9rem;
        height: auto;
        -webkit-line-clamp: 1;
    }

    .pool-stat {
        padding: 0.25rem;
    }

    .rating-stars {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 推荐解释样式 */
#recommendation-explanation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

/* 电影详情页样式 */
.movie-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 2rem;
}

.similar-movies .movie-card {
    margin-bottom: 1rem;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
/* 用户画像页面样式 */
.user-avatar {
    color: #6c757d;
}

.pool-preferences .preference-item {
    margin-bottom: 0.5rem;
}

.user-characteristics .preference-item {
    margin-bottom: 0.5rem;
}

.interaction-list .interaction-item:last-child {
    border-bottom: none !important;
}

.recommendation-list .recommendation-item:last-child {
    border-bottom: none !important;
}

/* 管理员仪表板样式 */
.pool-stat-admin {
    text-align: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.pool-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pool-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* 首页样式 */
.jumbotron {
    margin-bottom: 0;
}

.feature-icon {
    margin-bottom: 1rem;
}

.algorithm-features .feature-item,
.advantage-list .advantage-item {
    padding: 0.5rem 0;
}

/* JSON过滤器 */
.from_json {
    /* 占位符，实际过滤器在模板中定义 */
}